from django.contrib import admin
from .models import Label, Blog, Picture


class BlogAdmin(admin.ModelAdmin):
    fields = ['title', 'image', 'content', 'html', 'richText', 'labels', 'creator']
    list_display = ['title', 'pub_date', 'last_update_date', 'creator']


class PictureAdmin(admin.ModelAdmin):
    fields = ['title', 'blogId', 'image']
    list_display = ['title', 'blogId', 'url', 'image', 'pub_date']

# Register your models here.
admin.site.register(Label)
admin.site.register(Picture, PictureAdmin)
admin.site.register(Blog, BlogAdmin)
